USE [BMIG_Mensual_POST_CADENA]
GO

/****** Object:  StoredProcedure [dbo].[WASP_M0005_DROP_TABLAS]    Script Date: 11/28/2011 11:57:39 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[WASP_M0005_DROP_TABLAS]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[WASP_M0005_DROP_TABLAS]
GO

USE [BMIG_Mensual_POST_CADENA]
GO

/****** Object:  StoredProcedure [dbo].[WASP_M0005_DROP_TABLAS]    Script Date: 11/28/2011 11:57:39 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

-- =============================================
-- Author:		JJ
-- Create date: <28/11/2011>
-- Description:	<DROP  TABLAS>
-- =============================================
CREATE PROCEDURE [dbo].[WASP_M0005_DROP_TABLAS] AS
BEGIN
if exists (select * from dbo.sysobjects
					where id = object_id(N'[dbo].[base]') 
					and OBJECTPROPERTY(id, N'IsUserTable') = 1)
begin
drop table [dbo].[base]
end

if exists (select * from dbo.sysobjects
					where id = object_id(N'[dbo].[capital]')
					and OBJECTPROPERTY(id, N'IsUserTable') = 1)
begin
drop table [dbo].[capital]
end

if exists (select * from dbo.sysobjects
					where id = object_id(N'[dbo].[reajuste]')
					and OBJECTPROPERTY(id, N'IsUserTable') = 1)
begin
drop table [dbo].[reajuste]
end

if exists (select * from dbo.sysobjects
					where id = object_id(N'[dbo].[interes]')
					and OBJECTPROPERTY(id, N'IsUserTable') = 1)
begin
drop table [dbo].[interes]
end

if exists (select * from dbo.sysobjects
					where id = object_id(N'[dbo].[Prim_cuota_imp]')
					and OBJECTPROPERTY(id, N'IsUserTable') = 1)
begin
drop table [dbo].[Prim_cuota_imp]
end

if exists (select * from dbo.sysobjects
					where id = object_id(N'[dbo].[CRED_PRICE2]')
					and OBJECTPROPERTY(id, N'IsUserTable') = 1)
begin
drop table [dbo].[CRED_PRICE2]
end


if exists (select * from dbo.sysobjects
					where id = object_id(N'[dbo].[Cred_Price_Final2]')
					and OBJECTPROPERTY(id, N'IsUserTable') = 1)
begin
drop table [dbo].[Cred_Price_Final2]
end

END
GO

